var public_obj={
	win_alert:function(tips,msg,handle){
		$('body').prepend('<div class="js_dialog" id="iosDialog2" style="opacity: 0; display: none;">\
		<div class="weui-mask"></div>\
		<div class="weui-dialog">\
		<div class="weui-dialog__bd">'+tips+'</div>\
		<div class="weui-dialog__ft">\
		<a href="javascript:;" id="win_alert_btn" class="weui-dialog__btn weui-dialog__btn_primary">'+msg+'</a>\
		</div>\
		</div>\
		</div>');
        $('#iosDialog2').fadeIn(200);
		$('#iosDialog2 a').click(function(){
			$('#iosDialog2').fadeOut(200);
			$('#iosDialog2').remove();
		});
		if($.isFunction(handle)){
		$('#iosDialog2 .weui-dialog__btn_primary').click(handle);
		}
	},
	
	win_confirm:function(title,msg,tips,tips1,handle,handle1){
		$('body').prepend('<div class="js_dialog" id="iosDialog1" style="opacity: 0; display: none;">\
		<div class="weui-mask"></div>\
		<div class="weui-dialog">\
		<div class="weui-dialog__hd"><strong class="weui-dialog__title">'+title+'</strong></div>\
		<div class="weui-dialog__bd">'+msg+'</div>\
		<div class="weui-dialog__ft">\
		<a href="javascript:;" id="dialog__btn_default" class="weui-dialog__btn weui-dialog__btn_default">'+tips+'</a>\
		<a href="javascript:;" id="dialog__btn_primary" class="weui-dialog__btn weui-dialog__btn_primary">'+tips1+'</a>\
		</div>\
		</div>\
		</div>');
        $('#iosDialog1').fadeIn(200);
		$('#iosDialog1 #dialog__btn_default').click(function(){
			$('#iosDialog1').fadeOut(200);
			$('#iosDialog1').remove();
		});
		if($.isFunction(handle)){
		$('#iosDialog1 .weui-dialog__btn_default').click(handle);
		}
		$('#iosDialog1 #dialog__btn_primary').click(function(){
			$('#iosDialog1').fadeOut(200);
			$('#iosDialog1').remove();
		});
		if($.isFunction(handle1)){
		$('#iosDialog1 .weui-dialog__btn_primary').click(handle1);
		}
	},
	toast:function(msg,icon,url){
		$('body').prepend('<div id="toast" style="opacity: 0; display: none; z-index:99999;">\
		<div class="weui-mask_transparent" style=" z-index:9999"></div>\
		<div class="weui-toast"  style=" z-index:9999">\
		<i class="iconfont weui-icon_toast" style="font-size:42px;">'+icon+'</i>\
		<p class="weui-toast__content">'+msg+'</p>\
		</div>\
		</div>');
		var $toast = $('#toast');
		if ($toast.css('display') != 'none') return;
		  $toast.fadeIn(100);
		  setTimeout(function () {
			  $toast.fadeOut(100);
			  $toast.remove();
			  if(url){
				window.location=url;
			  }
		}, 2000);
	}
	
	 



}